import { Injectable } from '@angular/core'
import { Hero } from '../app/Hero'

@Injectable({
  providedIn: 'root'
})
export class HeroService {
  getHeroes(): Hero[] {
    let heroArray: Array<Hero> = []
    heroArray.push(new Hero("张三", 11))
    heroArray.push(new Hero("李四", 22))
    heroArray.push(new Hero("王五", 33))
    return heroArray
  }
}